<!--
  @author yangjiangming
  @date 2018-12-10 20:40:28
-->
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html th:replace="~{comment/modify/common/layout :: layout(true, ~{::title}, ~{::content}, ~{::script})}">

<head>
    <title>工单评价-回访</title>
</head>
<body>

<div th:fragment="content">

    <form class="layui-form" th:action="@{/work/modify/save/reply/visit.action}">
        <input type="hidden" name="orderId" th:value="${replyVisitVO.orderId}">
        <input type="hidden" name="workId" th:value="${replyVisitVO.workId}">
        <input type="hidden" name="operatorId" th:value="${operateId}">
        <input type="hidden" name="score">
        <div th:if="${replyVisitVO.shouldComment == 2}" th:with="isEvaluated = ${replyVisitVO.commentStatus == 2}">
            <div class="layui-form-item">
                <label class="layui-form-label d-label-60">订单评价</label>
                <div class="layui-inline">
                    <div id="rate" th:with="readonly = ${replyVisitVO.score !=null}" data-th-data-readonly="${readonly}">

                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label"></label>
                <div class="layui-inline" id="orderEvaluation" style="width:800px;">
                    <div class="layui-form-mid layui-word-aux" th:if="${isEvaluated}" th:text="${replyVisitVO.commentContent}"></div>
                    <div th:unless="${isEvaluated}">
                        <div class="layui-col-xs12 layui-col-sm6 layui-col-md3" th:each="item : ${replyVisitVO.commentCodeMapList}">
                            <input type="checkbox" lay-skin="primary" name="commentCodeMapList"
                                   th:title="${item.text}"
                                   th:value="${item.value}">
                        </div>
                    </div>
                </div>
            </div>
            <div class="layui-form-item" th:unless="${isEvaluated}">
                <label class="layui-form-label"></label>
                <div class="layui-input-block" style="width:800px;">
                    <textarea  class="layui-textarea d-reply-textarea" lay-verify="length"
                              name="commentContent" placeholder="其他评价内容"></textarea>
                </div>
            </div>
        </div>
        <!--订单评价跟回访内容是两条独立的数据-->
        <div class="layui-form-item">
            <label class="layui-form-label">回访内容</label>
            <div class="layui-input-block" style="width:800px;">
                <div id="returnVisitContent">
                    <div class="layui-col-xs12 layui-col-sm6 layui-col-md3" th:each="item : ${replyVisitVO.replyVisitCodeMapList}">
                        <input type="checkbox" lay-skin="primary" name="replyVisitCodeMapList"
                               th:title="${item.text}"
                               th:value="${item.value}">
                    </div>
                </div>
            </div>

        </div>
        <div class="layui-form-item">
            <label class="layui-form-label"></label>
            <div class="layui-inline" style="width:800px;">
                <textarea placeholder="其他回访内容" class="layui-textarea d-visit-textarae" lay-verify="length"
                          name="replyContent"></textarea>
            </div>
        </div>
        <div class="layui-form-item d-submit">
            <label class="layui-form-label"></label>
            <div class="layui-inline">
                <button lay-submit="" class="layui-btn layui-btn-normal">保存</button>
                <!--<button type="reset" class="layui-btn layui-btn-primary">重置</button>-->
            </div>
        </div>
    </form>
</div>

<script th:inline="javascript">
    var replyVisitVO = [[${replyVisitVO}]];
    var layuiModel = {
        oms_comment_modify_replyvisit: "comment/modify/zmn.oms.comment.modify.replyvisit"
    };
</script>
</body>
</html>